// pages/suopei/suopei_item/suopei_item.js
var app = getApp()

Page({

  /**
   * 页面的初始数据
   */
  data: {
    imgList: [],
  },
 
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var id = options.id
    var suopei = app.globalData.suopei[id]
    console.log(suopei)
    this.setData({
      suopei:suopei
    })
  },
  fuzhi(){
    console.log(this.data.suopei.shiping.join(','))
    var that = this
    wx.setClipboardData({
      data: "视频路径 :" + that.data.suopei.shiping.join(',') + "\n图片路径 :"+that.data.suopei.zhaopian.join(','),
      success() {
        wx.showToast({
          title: '复制成功',
          icon: 'success',
          duration: 1000
        })
      }
    })
  },
  ViewImage(e) {
    wx.previewImage({
      urls: this.data.suopei.zhaopian,
      current: e.currentTarget.dataset.url
    });
  },
})